home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / comm / misc / translate1_3.lha / transread.amirx < prev   
Encoding:
Text File  |  1998-01-05  |  5.0 KB  |  236 lines

  1. /* 
  2.  
  3. Translator V1.0
  4. By Commando (Casey Halverson)
  5. cmdo@gte.net
  6.  
  7. ---
  8.  
  9. si votre langue source n'est pas anglaise, lisez s'il vous plaît
  10. ci-dessous pour éditer des instructions.
  11.  
  12. ---
  13.  
  14. wenn Ihre Ausgangssprache nicht englisch ist, lesen Sie bitte unten
  15. für das Bearbeiten von Anweisungen.
  16.  
  17. --- 
  18.  
  19. se la vostra lingua di partenza non è inglese, leggere prego sotto
  20. per la pubblicazione delle istruzioni.
  21.  
  22. ---
  23.  
  24. se sua língua de fonte não for inglesa, leia por favor abaixo
  25. editando instruções.
  26.  
  27. ---
  28.  
  29. si su lengua orígen no es inglesa, lea por favor abajo para corregir
  30. instrucciones.
  31.  
  32. ---
  33.  
  34. This script makes use of Alta Vista's translator to send
  35. and receive messages via IRC.
  36.  
  37. Due to the slow nature of HTTP transactions, there will be
  38. a delay of text translation.  It is not recomended to visit
  39. channels of high traffic, for it may bog down your system or
  40. possibly cause crashing of your TCP/IP stack due to the hundreds
  41. of requests issued.
  42.  
  43. WARNING and DISCLAIMER:
  44.  
  45. When translating to another language, meanings can be twisted.
  46. It is highly suggested that one takes care in program usage.  
  47. I would suggest notifing the parties about using such a program
  48. and to be understanding if such mis-translations were to occur.
  49.  
  50. I take no responsiblity for mis-translations.  You may not blame
  51. me for loss of profit, mis-translations, unwanted reactions, damage
  52. to your system, harm to property or persons, or possible political
  53. complications including, but not limited to, all types of war including
  54. thermonuclear war and all other types of balistic missile attacks,
  55. biochemical warfare, pillaging of towns or cities or both, and anything
  56. else not mentioned in this text.
  57.  
  58. Please note that there are many parties which can intercept this
  59. language transaction.  It is not recomended that one discuss private
  60. issues and that one consider these transactions are being intercepted
  61. or monitored, and not limited to, your ISP, routers, Alta-Vista,
  62. and your IRC server as well as the other part(ies)'s path.
  63.  
  64. This program makes use of Alta-Vista's translator service much easier
  65. to use and in no way replaces, assumes credit or obtains rights to these
  66. trademarks.
  67.  
  68. */
  69.  
  70. a=arg(1)
  71.  
  72. language = subword(a,1,1)
  73.  
  74. from = "e"
  75.  
  76. /* 
  77.  
  78. (ENGLISH)
  79.  
  80. language setup notice 
  81.  
  82. The source language can be changed by the "FROM" value above.
  83. if you wish to change the source language, you must change this
  84. to:
  85.  
  86. f = french
  87. g = german
  88. i = italian
  89. p = portuguese
  90. s = spanish
  91.  
  92. (FRANÇAIS - TRADUIT)
  93.  
  94. le langage a installé la notification
  95.  
  96. La langue source peut être changée par "FROM" la valeur ci-dessus.
  97. si vous souhaitez changer la langue source, vous devez changer ceci
  98. en:
  99.  
  100. f = français
  101. g = Allemand
  102. i = italien
  103. p = portugais
  104. s = espagnols
  105.  
  106. (DEUTSCHER - ÜBERSETZT)
  107.  
  108. gründete Sprache Begriff
  109.  
  110. Die Ausgangssprache kann durch "FROM" Wert oben geändert werden.
  111. wenn Sie die Ausgangssprache ändern möchten, müssen Sie dieses zu
  112. ändern:
  113.  
  114. f = französisch
  115. g = Deutscher
  116. I = italienisch
  117. p = portugiesisch
  118. s = Spanisch
  119.  
  120. (ITALIANO - TRADOTTO)
  121.  
  122. avviso di messa a punto di lingua
  123.  
  124. La lingua di partenza può essere cambiata "FROM" dal valore qui
  125. sopra.  se desiderate cambiare la lingua di partenza, dovete cambiare
  126. questo a:
  127.  
  128. f = francese
  129. g = tedesco
  130. i = italiano
  131. p = portoghese
  132. s = Spagnoli
  133.  
  134. (ITALIANO - TRADUZIDO)
  135.  
  136. observação da instalação da língua
  137.  
  138. A língua de fonte pode ser mudada " " pelo valor acima.  se você
  139. desejar mudar a língua de fonte, você deve mudar este a:
  140.  
  141. f = francês
  142. g = alemão
  143. i = italiano
  144. p = portuguese
  145. s = espanhóis
  146.  
  147. (PORTUGUESE -  Traduzido)
  148.  
  149. observação da instalação da língua
  150.  
  151. A língua de fonte pode ser mudada " " pelo valor acima.  se você
  152. desejar mudar a língua de fonte, você deve mudar este a:
  153.  
  154. f = francês
  155. g = alemão
  156. i = italiano
  157. p = portuguese
  158. s = espanhóis
  159.  
  160.  
  161. (ESPAÑOL - TRADUCIDO)
  162.  
  163. el lenguaje setup el aviso
  164.  
  165. La lengua orígen se puede cambiar por " " el valor arriba.  si usted
  166. desea cambiar la lengua orígen, usted debe cambiar esto a:
  167.  
  168. f = francés
  169. g = alemán
  170. i = italiano
  171. p = portugués
  172. s = españoles
  173.  
  174. */
  175.  
  176. if language = "french" then lg="f"||from
  177. if language = "german" then lg="g"|||from
  178. if language = "italian" then lg="i"||from
  179. if language = "portuguese" then lg="p"||from
  180. if language = "spanish" then lg="s"||from
  181.  
  182. if lg = "" then language = "s"||from
  183.  
  184. do while(1)
  185.  
  186. if exists("RAM:transstop")=1 then do
  187.     address command "delete ram:transstop"
  188.     exit
  189. end
  190.  
  191. GETLINE
  192. a = LINE
  193.  
  194. if subword(a,2,1)="PRIVMSG" then do
  195.  
  196. user=line.prefix
  197. n=index(user,"!")
  198. nick=substr(user,1,n-1)
  199.  
  200. a = substr(subword(a,4),2)
  201.  
  202. txt = translate(a,"+"," ")
  203.  
  204. call open(1,"TCP:babelfish.altavista.digital.com/80")
  205. call writeln(1,"GeT /cgi-bin/translate?doit=done&urltext="||txt||"&languagepair="||lg)
  206. call writeln(1,"")
  207.  
  208. do while (1)
  209.     if eof(1)=1 then exit
  210.     a=readln(1)
  211.     if a="" then leave
  212. end
  213.  
  214. z=0
  215.  
  216. do while (1)
  217.     if eof(1)=1 then exit
  218.     a=readln(1)
  219.     if a='<td align="left">' then do
  220.         a=readln(1)
  221.         do while(1)
  222.             a=readln(1)
  223.             if a='</td><td><img border=0 src="/gifs/clear.gif" width="15" height="0"></td></tr>' then leave
  224.             'ECHO P='d2c(27)'b«'language'» C=2'  "<"||nick||"> "||a
  225.         end
  226.         call close(1)
  227.         z=1
  228.         leave
  229.     end
  230.     if z=1 then leave
  231. end
  232.  
  233. end
  234.  
  235. end
  236.